package com.github.wxpay.sdk;

import org.springframework.beans.factory.annotation.Autowired;

import java.io.InputStream;

public class MyWXPayConfig extends WXPayConfig{

    @Override
    public String getAppID() {
        return "wx40f3977de5acd9f3";
    }

    @Override
    public String getMchID() {
        return "1670643181";
    }

    @Override
    public String getKey() {
        return "Q1w2e3r4t5y6u7i8o9p0zxcvbnmasdfg";
    }

    @Override
    public InputStream getCertStream() {
        return null;
    }

    @Override
    public IWXPayDomain getWXPayDomain() {
        return new IWXPayDomain() {
            @Override
            public void report(String domain, long elapsedTimeMillis, Exception ex) {

            }

            @Override
            public DomainInfo getDomain(WXPayConfig config) {
                return new DomainInfo(WXPayConstants.DOMAIN_API, true);
            }
        };
    }

    public int getHttpConnectTimeoutMs() {
        return 8000;
    }

    public int getHttpReadTimeoutMs() {
        return 10000;
    }
}
